package top.shaozuo.simple.user.web.listener;

import java.util.logging.Logger;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import top.shaozuo.simple.context.ClassicComponentContext;


@WebListener
public class ComponentContextListener implements ServletContextListener {

	private static final Logger logger = Logger.getLogger(ComponentContextListener.class.getName());

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		logger.info("ServletContextEvent occur");
		ClassicComponentContext context = new ClassicComponentContext();
		context.init(sce.getServletContext());
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		logger.info("ServletContextEvent occur");
	}

}
